-
Notifications
You must be signed in to change notification settings - Fork 32
Residential thermal load components from ResStock #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Questions:
|
| RESSTOCK_SEGMENT_TO_CATEGORY = { | ||
| # Windows / skylights | ||
| "windows_conduction": "WIND_COND", | ||
| "skylights_conduction": "WIND_COND", | ||
| "windows_solar": "WIND_SOL", | ||
| "skylights_solar": "WIND_SOL", | ||
| # Roof / ceilings | ||
| "roofs": "ROOF", | ||
| "ceilings": "ROOF", | ||
| # Walls / opaque | ||
| "walls": "WALL", | ||
| "foundation_walls": "WALL", | ||
| "rim_joists": "WALL", | ||
| "doors": "WALL", | ||
| # Infiltration / ventilation | ||
| "infiltration": "INFIL", | ||
| "mechanical_ventilation": "INFIL", | ||
| "natural_ventilation": "INFIL", | ||
| # Ground contact | ||
| "slabs": "GRND", | ||
| "floors": "GRND", | ||
| # Internal/equipment gains | ||
| "internal_gains": "EQUIP", | ||
| "internal_mass": "EQUIP", | ||
| "lighting": "EQUIP", | ||
| "whole_house_fan": "EQUIP", | ||
| "ducts": "EQUIP", | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Components: Resstock to Scout
| BLDG_MAPPING = { | ||
| '50 or more Unit': 'multi family home', | ||
| 'Single-Family Detached': 'single family home', | ||
| 'Single-Family Attached': 'single family home', | ||
| 'Mobile Home': 'mobile home', | ||
| '20 to 49 Unit': 'multi family home', | ||
| '5 to 9 Unit': 'multi family home', | ||
| '3 or 4 Unit': 'multi family home', | ||
| '2 Unit': 'multi family home', | ||
| '10 to 19 Unit': 'multi family home', | ||
| 'nan': None | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building types mapping: RESSTOCK to Scout
@jmythms to lump components in ecm_prep.py, mix in people component into internal gains. |
| # ============================================================================== | ||
| # COMMERCIAL THERMAL LOADS DATA PROCESSING SCRIPT | ||
| # ============================================================================== | ||
| # This script processes base thermal loads data for commercial buildings and | ||
| # converts it from climate zone-based to census division-based organization | ||
| # for use in building energy modeling and analysis. | ||
| # | ||
| # Input: Com_TLoads_Base.csv - Base thermal loads data by climate zone | ||
| # Output: Com_TLoads_PrepFinal.txt - Processed thermal loads by census division | ||
| # Com_Cdiv_Czone_ConvertTablePrep.txt - Conversion factors | ||
| # Com_Cdiv_Czone_ConvertTablePrep_Rev.txt - Reverse conversion factors | ||
| # ============================================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep the R scripts here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets delete them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| # =============================================================================== | ||
| # Residential Thermal Loads Processing Script | ||
| # =============================================================================== | ||
| # This script processes residential thermal loads data and creates conversion | ||
| # tables for mapping between census divisions and climate zones. | ||
| # | ||
| # Part 1: Process residential thermal loads by building type and end use | ||
| # Part 2: Create census division to climate zone conversion tables from RECS data | ||
| # =============================================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Residential scripts are here.
| ALL_COLS = [ | ||
| "Unnamed: 0", | ||
| "building_id", | ||
| "job_id", | ||
| "started_at", | ||
| "completed_at", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
Divide heating and cooling |
|
verify if the other mseg_* files changed or not? |
fe7a4b5 to
5f6d082
Compare
…k/scout into issue-486/thermal_loads
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The core script to generate Scout-compatible files looks to be correct, and I was able to successfully run it myself. I have a few questions, but I don't think my changes will result in new input files (or at least not change the final results).
Regarding the comparisons, I think they look pretty reasonable. The components/end uses that jump out tend to hover around zero so the relative differences can be high, or they are related to mobile homes which have a low saturation, and I trust their representation ResStock. That is to say that I think the differences are due to modeling assumptions, and not the methods implemented in this PR.
|
|
||
| * Map residential table building types to AEO building types. | ||
| * Single-Family Detached -> single family home | ||
| * Single-Family Attached -> single family home |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtlangevin does this look right or should SFA map to multi family?
| * Manually input data from the PDF publications, as in :repo_file:`Res_TLoads_Base.csv` and :repo_file:`Com_TLoads_Base.csv`. | ||
|
|
||
| 3. Condense CSV tables into final set of thermal load components data using an R script. | ||
| 3. Condense CSV tables into final set of thermal load components data using an R/Python script. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 3. Condense CSV tables into final set of thermal load components data using an R/Python script. | |
| 3. Condense CSV tables into final set of thermal load components data. |
| Non-destructive: original component nodes are preserved under | ||
| ['internal gains']['components_original']. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed
| for fuel_key, fuel_val in bldg_val.items(): | ||
| if not isinstance(fuel_val, dict): | ||
| continue | ||
| # print(f"Processing {geo_key} {bldg_key} {fuel_key}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete comment
| # ============================================================================== | ||
| # COMMERCIAL THERMAL LOADS DATA PROCESSING SCRIPT | ||
| # ============================================================================== | ||
| # This script processes base thermal loads data for commercial buildings and | ||
| # converts it from climate zone-based to census division-based organization | ||
| # for use in building energy modeling and analysis. | ||
| # | ||
| # Input: Com_TLoads_Base.csv - Base thermal loads data by climate zone | ||
| # Output: Com_TLoads_PrepFinal.txt - Processed thermal loads by census division | ||
| # Com_Cdiv_Czone_ConvertTablePrep.txt - Conversion factors | ||
| # Com_Cdiv_Czone_ConvertTablePrep_Rev.txt - Reverse conversion factors | ||
| # ============================================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets delete them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am less picky on documentation and design of these scripts, but this function could use a more detailed description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be able to just do an average instead of a weighted average
scout/supporting_data/thermal_loads_data/resstock_to_thermalLoads.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused what this script does? Is it redundant with resstock_to_thermalLoads.py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a python equivalent to scout\supporting_data\thermal_loads_data\Res_TLoads_Process.R. If we are not keeping the R scripts, delete this as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it do? Does it do something different than resstock_to_thermalLoads.py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does the equivalent of resstock_to_thermalLoads.py, but for the previous original dataset using RECS microdata, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, in that case I think we can delete it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all the mseg files generated using the CDIV component load file? And just mapped in teh translator script?
This PR will update the current thermal load components data to the latest BuildStock data.
RESSTOCK vs Current Scout Data comparison:
Key notes:
How to interpret these plots:
More stats:
HEATING
COOLING
Calculation methods:
Mean diff = (ResStock-ScoutCurrentData).mean()
MAE = (|ResStock-ScoutCurrentData|).mean()
Sign Agree = (if sign_ResStock == sign_ScoutCurrentData).mean() to percentage
Correlation = ResStock.corr(ScoutCurrentData)